<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: Vu::Gadget</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">Vu::Gadget</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../files/Vu/Gadget_rb.html">
                Vu/Gadget.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                Object
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
Base class of the gadget heirachy
</p>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000068">attach_to_parent!</a>&nbsp;&nbsp;
      <a href="#M000070">children</a>&nbsp;&nbsp;
      <a href="#M000065">cm_h</a>&nbsp;&nbsp;
      <a href="#M000064">cm_w</a>&nbsp;&nbsp;
      <a href="#M000076">contains?</a>&nbsp;&nbsp;
      <a href="#M000069">detach_from_parent!</a>&nbsp;&nbsp;
      <a href="#M000067">min_height</a>&nbsp;&nbsp;
      <a href="#M000066">min_width</a>&nbsp;&nbsp;
      <a href="#M000082">mouse_click</a>&nbsp;&nbsp;
      <a href="#M000078">mouse_enter</a>&nbsp;&nbsp;
      <a href="#M000079">mouse_exit</a>&nbsp;&nbsp;
      <a href="#M000077">mouse_move</a>&nbsp;&nbsp;
      <a href="#M000080">mouse_press</a>&nbsp;&nbsp;
      <a href="#M000081">mouse_release</a>&nbsp;&nbsp;
      <a href="#M000074">render</a>&nbsp;&nbsp;
      <a href="#M000073">render_children</a>&nbsp;&nbsp;
      <a href="#M000071">request_render</a>&nbsp;&nbsp;
      <a href="#M000072">request_render_all</a>&nbsp;&nbsp;
      <a href="#M000062">resize!</a>&nbsp;&nbsp;
      <a href="#M000063">resize_has_occured</a>&nbsp;&nbsp;
      <a href="#M000075">window</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">height</td>
          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
          <td class="context-item-desc">
Width and height of the gadget

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">id</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
An arbitrary name for the gadget. Can be used by the parent or the
application to denote special gadgets - &quot;window_close&quot;,
&quot;default_button&quot;

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">width</td>
          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
          <td class="context-item-desc">
Width and height of the gadget

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">x_origin</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">y_origin</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000068" class="method-detail">
        <a name="M000068"></a>

        <div class="method-heading">
          <a href="Gadget.src/M000068.html" target="Code" class="method-signature"
            onclick="popupCode('Gadget.src/M000068.html');return false;">
          <span class="method-name">attach_to_parent!</span><span class="method-args">(p)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Attach this gadget to a parent. Only for internal use. (See detach_..)
</p>
        </div>
      </div>

      <div id="method-M000070" class="method-detail">
        <a name="M000070"></a>

        <div class="method-heading">
          <a href="Gadget.src/M000070.html" target="Code" class="method-signature"
            onclick="popupCode('Gadget.src/M000070.html');return false;">
          <span class="method-name">children</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
The array of <a href="Gadget.html#M000070">children</a>
</p>
        </div>
      </div>

      <div id="method-M000065" class="method-detail">
        <a name="M000065"></a>

        <div class="method-heading">
          <a href="Gadget.src/M000065.html" target="Code" class="method-signature"
            onclick="popupCode('Gadget.src/M000065.html');return false;">
          <span class="method-name">cm_h</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Height of a centimeter
</p>
        </div>
      </div>

      <div id="method-M000064" class="method-detail">
        <a name="M000064"></a>

        <div class="method-heading">
          <a href="Gadget.src/M000064.html" target="Code" class="method-signature"
            onclick="popupCode('Gadget.src/M000064.html');return false;">
          <span class="method-name">cm_w</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Width of a centimeter
</p>
        </div>
      </div>

      <div id="method-M000076" class="method-detail">
        <a name="M000076"></a>

        <div class="method-heading">
          <a href="Gadget.src/M000076.html" target="Code" class="method-signature"
            onclick="popupCode('Gadget.src/M000076.html');return false;">
          <span class="method-name">contains?</span><span class="method-args">(x,y)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns whomever - within the constraints of this gadget - owns mouse
events at the given position. Returns false, or [gadget, x, y] - where
gadget may be self, and x and y are in it&#8216;s co-ordinate space.
</p>
        </div>
      </div>

      <div id="method-M000069" class="method-detail">
        <a name="M000069"></a>

        <div class="method-heading">
          <a href="Gadget.src/M000069.html" target="Code" class="method-signature"
            onclick="popupCode('Gadget.src/M000069.html');return false;">
          <span class="method-name">detach_from_parent!</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Detaches this gadget from a parent (does NOT remove it from any of the
parent&#8216;s data structures). Only for internal use.
</p>
        </div>
      </div>

      <div id="method-M000067" class="method-detail">
        <a name="M000067"></a>

        <div class="method-heading">
          <a href="Gadget.src/M000067.html" target="Code" class="method-signature"
            onclick="popupCode('Gadget.src/M000067.html');return false;">
          <span class="method-name">min_height</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Minimum height
</p>
        </div>
      </div>

      <div id="method-M000066" class="method-detail">
        <a name="M000066"></a>

        <div class="method-heading">
          <a href="Gadget.src/M000066.html" target="Code" class="method-signature"
            onclick="popupCode('Gadget.src/M000066.html');return false;">
          <span class="method-name">min_width</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Minimum width
</p>
        </div>
      </div>

      <div id="method-M000082" class="method-detail">
        <a name="M000082"></a>

        <div class="method-heading">
          <a href="Gadget.src/M000082.html" target="Code" class="method-signature"
            onclick="popupCode('Gadget.src/M000082.html');return false;">
          <span class="method-name">mouse_click</span><span class="method-args">(b,x,y)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Gives this gadget a mouse click event
</p>
        </div>
      </div>

      <div id="method-M000078" class="method-detail">
        <a name="M000078"></a>

        <div class="method-heading">
          <a href="Gadget.src/M000078.html" target="Code" class="method-signature"
            onclick="popupCode('Gadget.src/M000078.html');return false;">
          <span class="method-name">mouse_enter</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Gives this gadget a mouse enter event
</p>
        </div>
      </div>

      <div id="method-M000079" class="method-detail">
        <a name="M000079"></a>

        <div class="method-heading">
          <a href="Gadget.src/M000079.html" target="Code" class="method-signature"
            onclick="popupCode('Gadget.src/M000079.html');return false;">
          <span class="method-name">mouse_exit</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Gives this gadget a mouse exit event
</p>
        </div>
      </div>

      <div id="method-M000077" class="method-detail">
        <a name="M000077"></a>

        <div class="method-heading">
          <a href="Gadget.src/M000077.html" target="Code" class="method-signature"
            onclick="popupCode('Gadget.src/M000077.html');return false;">
          <span class="method-name">mouse_move</span><span class="method-args">(x,y)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Gives this gadget a mouse movement event
</p>
        </div>
      </div>

      <div id="method-M000080" class="method-detail">
        <a name="M000080"></a>

        <div class="method-heading">
          <a href="Gadget.src/M000080.html" target="Code" class="method-signature"
            onclick="popupCode('Gadget.src/M000080.html');return false;">
          <span class="method-name">mouse_press</span><span class="method-args">(b,x,y)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Gives this gadget a mouse button press/down event
</p>
        </div>
      </div>

      <div id="method-M000081" class="method-detail">
        <a name="M000081"></a>

        <div class="method-heading">
          <a href="Gadget.src/M000081.html" target="Code" class="method-signature"
            onclick="popupCode('Gadget.src/M000081.html');return false;">
          <span class="method-name">mouse_release</span><span class="method-args">(b,x,y)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Gives the gadget a mouse button release/up event
</p>
        </div>
      </div>

      <div id="method-M000074" class="method-detail">
        <a name="M000074"></a>

        <div class="method-heading">
          <a href="Gadget.src/M000074.html" target="Code" class="method-signature"
            onclick="popupCode('Gadget.src/M000074.html');return false;">
          <span class="method-name">render</span><span class="method-args">(cairo)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Paint the gadget on given <a href="../Cairo.html">Cairo</a> context
</p>
        </div>
      </div>

      <div id="method-M000073" class="method-detail">
        <a name="M000073"></a>

        <div class="method-heading">
          <a href="Gadget.src/M000073.html" target="Code" class="method-signature"
            onclick="popupCode('Gadget.src/M000073.html');return false;">
          <span class="method-name">render_children</span><span class="method-args">(cairo)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Renders only the child gadgets
</p>
        </div>
      </div>

      <div id="method-M000071" class="method-detail">
        <a name="M000071"></a>

        <div class="method-heading">
          <a href="Gadget.src/M000071.html" target="Code" class="method-signature"
            onclick="popupCode('Gadget.src/M000071.html');return false;">
          <span class="method-name">request_render</span><span class="method-args">(x,y,w,h)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Request that a section of the gadget be redrawn
</p>
        </div>
      </div>

      <div id="method-M000072" class="method-detail">
        <a name="M000072"></a>

        <div class="method-heading">
          <a href="Gadget.src/M000072.html" target="Code" class="method-signature"
            onclick="popupCode('Gadget.src/M000072.html');return false;">
          <span class="method-name">request_render_all</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Request that the whole gadget be redrawn
</p>
        </div>
      </div>

      <div id="method-M000062" class="method-detail">
        <a name="M000062"></a>

        <div class="method-heading">
          <a href="Gadget.src/M000062.html" target="Code" class="method-signature"
            onclick="popupCode('Gadget.src/M000062.html');return false;">
          <span class="method-name">resize!</span><span class="method-args">(w, h)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Resizes the gadget (should only be called by parent&#8216;s perform_layout)
</p>
        </div>
      </div>

      <div id="method-M000063" class="method-detail">
        <a name="M000063"></a>

        <div class="method-heading">
          <a href="Gadget.src/M000063.html" target="Code" class="method-signature"
            onclick="popupCode('Gadget.src/M000063.html');return false;">
          <span class="method-name">resize_has_occured</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Called when the gadget has been resized by a parent
</p>
        </div>
      </div>

      <div id="method-M000075" class="method-detail">
        <a name="M000075"></a>

        <div class="method-heading">
          <a href="Gadget.src/M000075.html" target="Code" class="method-signature"
            onclick="popupCode('Gadget.src/M000075.html');return false;">
          <span class="method-name">window</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
The top level <a href="Gadget.html#M000075">window</a> the gadget is in
</p>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>